From 9df7b4b119b8107a3c7da4ea3c2c6908129a57c5 Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Wed, 24 Aug 2005 20:43:16 +0000 Subject: [PATCH] Watch may fire before we've allocated the interface structure. Signed-off-by: Christian Limpach --- linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c index 9d255aefd8..61861b3735 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c @@ -69,7 +69,7 @@ static void frontend_changed(struct xenbus_watch *watch, const char *node) device_unregister(&be->dev->dev); return; } - if (be->blkif->status == CONNECTED) + if (be->blkif == NULL || be->blkif->status == CONNECTED) return; err = xenbus_gather(be->frontpath, "grant-id", "%lu", &sharedmfn, -- 2.30.2